home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / wgdb-42.lha / wgdb-4.2 / config.sub < prev    next >
Text File  |  1992-09-11  |  7KB  |  426 lines

  1. #!/bin/sh
  2.  
  3. # Configuration subroutine to validate and canonicalize a configuration type.
  4. # Supply the specified configuration type as an argument.
  5. # If it is invalid, we print an error message on stderr and exit with code 1.
  6. # Otherwise, we print the canonical config type on stdout and succeed.
  7.  
  8. # This file is supposed to be the same for all GNU packages
  9. # and recognize all the CPU types, system types and aliases
  10. # that are meaningful with *any* GNU software.
  11. # Each package is responsible for reporting which valid configurations
  12. # it does not support.  The user should be able to distinguish
  13. # a failure to support a valid configuration from a meaningless
  14. # configuration (e.g. a typo).
  15.  
  16. # Please email any bugs, comments, and/or additions to this file to:
  17. # configure@cygnus.com
  18.  
  19. # decode aliases into canonical names
  20. # Note that aliases MUST fit into 12 characters or less otherwise the
  21. # install targets and subdir builds all die on machines that support
  22. # only 14 char file names.  They die miserably on machines that rudely
  23. # enforce the 14 character limit.
  24.  
  25. case "$1" in
  26. # cpu alone is a valid alias for cpu-none-none.
  27. vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc | ns32k \
  28.     | alliant | arm | c1 | c2 | mips | pyramid | tron | a29k \
  29.     | romp | rs6000 | i960 | h8300)
  30.     cpu=$1
  31.     vendor=none
  32.     os=none
  33.     ;;
  34. altos | altos3068)
  35.     cpu=m68k
  36.     vendor=altos
  37.     os=sysv # maybe?
  38.     ;;
  39. altosgas)
  40.     cpu=m68k
  41.     vendor=altos
  42.     os=gas
  43.     ;;
  44. am29k)
  45.     cpu=a29k
  46.     vendor=none
  47.     os=bsd
  48.     ;;
  49. amdahl)
  50.     cpu=580
  51.     vendor=amdahl
  52.     os=uts
  53.     ;;
  54. amigados)
  55.     cpu=m68k
  56.     vendor=cbm
  57.     os=amigados # Native AmigaDOS
  58.     ;;
  59. amigaunix | amix)
  60.     cpu=m68k
  61.     vendor=cbm
  62.     os=svr4 # System V Release 4 (svr4 is an industry recognized acronym)
  63.     ;;
  64. apollo68)
  65.     cpu=m68k
  66.     vendor=apollo
  67.     os=sysv # maybe?
  68.     ;;
  69. balance)
  70.     cpu=ns32k
  71.     vendor=sequent
  72.     os=dynix
  73.     ;;
  74. convex-c1)
  75.     cpu=c1
  76.     vendor=convex
  77.     os=sysv # maybe?
  78.     ;;
  79. convex-c2)
  80.     cpu=c2
  81.     vendor=convex
  82.     os=sysv # maybe?
  83.     ;;
  84. cray | ymp)
  85.     cpu=ymp
  86.     vendor=cray
  87.     os=unicos
  88.     ;;
  89. cray2)
  90.     cpu=cray2
  91.     vendor=cray
  92.     os=unicos
  93.     ;;
  94. dec3100 | decstatn | decstation | decstation-3100 | pmax | pmin)
  95.     cpu=mips
  96.     vendor=dec
  97.     os=ultrix
  98.     ;;
  99. delta | 3300 | motorola-3300 | motorola-delta \
  100.       | 3300-motorola | delta-motorola)
  101.     cpu=m68k
  102.     vendor=motorola
  103.     os=sysv # maybe?
  104.     ;;
  105.  
  106. delta88)
  107.     cpu=m88k
  108.     vendor=motorola
  109.     os=m88kbcs
  110.     ;;
  111.  
  112. ebmon29k)
  113.     cpu=a29k
  114.     vendor=amd
  115.     os=ebmon
  116.     ;;
  117. gmicro)
  118.     cpu=tron
  119.     vendor=gmicro
  120.     os=sysv # maybe?
  121.     ;;
  122.  
  123. h8300hds)
  124.     cpu=h8300
  125.     vendor=hitachi
  126.     os=hds
  127.     ;;
  128.  
  129. hp300bsd)
  130.     cpu=m68k
  131.     vendor=hp
  132.     os=bsd
  133.     ;;
  134. hp300hpux | hpux | hp9k3[2-9][0-9])
  135.     cpu=m68k
  136.     vendor=hp
  137.     os=hpux
  138.     ;;
  139. hp9k31[0-9] | hp9k2[0-9][0-9])
  140.     cpu=m68000
  141.     vendor=hp
  142.     os=hpux
  143.     ;;
  144. i386sco)
  145.     cpu=i386
  146.     vendor=sco
  147.     os=sysv # maybe?
  148.     ;;
  149. i386v)
  150.     cpu=i386
  151.     vendor=none
  152.     os=sysv
  153.     ;;
  154. i386v32)
  155.     cpu=i386
  156.     vendor=none
  157.     os=sysv32
  158.     ;;
  159. iris | iris4d)
  160.     cpu=mips
  161.     vendor=sgi
  162.     os=irix # maybe?
  163.     ;;
  164.  
  165. dpx2)
  166.     vendor=bull
  167.     cpu=m68k
  168.     os=sysv
  169.     ;;
  170. isi | isi68)
  171.     cpu=m68k
  172.     vendor=isi
  173.     os=sysv # maybe?
  174.     ;;
  175. littlemips)
  176.     cpu=mips
  177.     vendor=little
  178.     os=bsd
  179.     ;;
  180. magnum | m3230)
  181.     cpu=mips
  182.     vendor=mips
  183.     os=sysv # maybe?
  184.     ;;
  185. merlin)
  186.     cpu=ns32k
  187.     vendor=utek
  188.     os=sysv # maybe?
  189.     ;;
  190. miniframe)
  191.     cpu=m68000
  192.     vendor=convergent
  193.     os=sysv # maybe?
  194.     ;;
  195. mmax)
  196.     cpu=ns32k
  197.     vendor=encore
  198.     os=sysv # maybe?
  199.     ;;
  200. news | news700 | news800 | news900)
  201.     cpu=m68k
  202.     vendor=sony
  203.     os=newsos # newsos3c or newsos4c, c stands for cisc. Based on bsd-4.3.
  204.     ;;
  205. news1000)
  206.     cpu=m68030
  207.     vendor=sony
  208.     os=newsos
  209.     ;;
  210. news-3600 | bigmips | risc-news)
  211.     cpu=mips
  212.     vendor=sony
  213.     os=newsos # Presumably newsos4r, r stands for risc. Based on bsd-4.3.
  214.     ;;
  215. next)
  216.     cpu=m68k
  217.     vendor=next
  218.     os=sysv # maybe?
  219.     ;;
  220. nindy960)
  221.     cpu=i960
  222.     vendor=intel
  223.     os=nindy
  224.     ;;
  225. none)
  226.     cpu=none
  227.     vendor=none
  228.     os=none
  229.     ;;
  230. np1)
  231.     cpu=np1
  232.     vendor=gould
  233.     os=sysv # maybe?
  234.     ;;
  235. rtpc)
  236.     cpu=romp
  237.     vendor=ibm
  238.     os=aix # maybe?
  239.     ;;    
  240. pbd)
  241.     cpu=sparc
  242.     vendor=unicom
  243.     os=sysv
  244.     ;;
  245. pn)
  246.     cpu=pn
  247.     vendor=gould
  248.     os=sysv # maybe?
  249.     ;;
  250. ps2)
  251.     cpu=i386
  252.     vendor=ibm
  253.     os=sysv # maybe?
  254.     ;;
  255. sun2)
  256.     cpu=m68000
  257.     vendor=sun
  258.     os=sunos4
  259.     ;;
  260. sun2os3)
  261.     cpu=m68000
  262.     vendor=sun
  263.     os=sunos3
  264.     ;;
  265. sun2os4)
  266.     cpu=m68000
  267.     vendor=sun
  268.     os=sunos4
  269.     ;;
  270. sun3)
  271.     cpu=m68k
  272.     vendor=sun
  273.     os=sunos4
  274.     ;;
  275. sun3os3)
  276.     cpu=m68k
  277.     vendor=sun
  278.     os=sunos3
  279.     ;;
  280. sun3os4)
  281.     cpu=m68k
  282.     vendor=sun
  283.     os=sunos4
  284.     ;;
  285. sun386 | roadrunner | sun386i)
  286.     cpu=i386
  287.     vendor=sun
  288.     os=sunos
  289.     ;;
  290. sun4)
  291.     cpu=sparc
  292.     vendor=sun
  293.     os=sunos4
  294.     ;;
  295. sun4os3)
  296.     cpu=sparc
  297.     vendor=sun
  298.     os=sunos3
  299.     ;;
  300. sun4os4)
  301.     cpu=sparc
  302.     vendor=sun
  303.     os=sunos4
  304.     ;;
  305. symmetry)
  306.     cpu=i386
  307.     vendor=sequent
  308.     os=dynix
  309.     ;;
  310. tower | tower-32)
  311.     cpu=m68k
  312.     vendor=ncr
  313.     os=sysv # maybe?
  314.     ;;
  315. ultra3)
  316.     cpu=a29k
  317.     vendor=nyu
  318.     os=sym1
  319.     ;;
  320. umax)
  321.     cpu=ns32k
  322.     vendor=encore
  323.     os=sysv # maybe?
  324.     ;;
  325. unixpc | safari | pc7300 | 3b1 | 7300 | 7300-att | att-7300)
  326.     cpu=m68k
  327.     vendor=att
  328.     os=sysv # maybe?
  329.     ;;
  330. vax-dec)
  331.     cpu=vax
  332.     vendor=dec
  333.     os=ultrix # maybe?
  334.     ;;
  335. vxworks68)
  336.     cpu=m68k
  337.     vendor=wrs
  338.     os=vxworks
  339.     ;;
  340. vxworks960)
  341.     cpu=i960
  342.     vendor=wrs
  343.     os=vxworks
  344.     ;;
  345. xmp)
  346.     cpu=xmp
  347.     vendor=cray
  348.     os=unicos
  349.     ;;
  350. # not an alias.  parse what we expect to be a canonical name.
  351. *)
  352.     cpu=`echo $1 | sed 's/-.*$//'`
  353.  
  354.     if [ "${cpu}" = "$1" ] ; then
  355.         # no vendor so this is an invalid name.
  356.         echo '***' Configuration \"$1\" not recognized 1>&2
  357.         exit 1
  358.     else
  359.         # parse out vendor
  360.         rest=`echo $1 | sed "s/${cpu}-//"`
  361.         vendor=`echo ${rest} | sed 's/-.*$//'`
  362.  
  363.         if [ "${vendor}" = "${rest}" ] ; then
  364.             # a missing os is acceptable
  365.             os=none
  366.         else
  367.             os=`echo ${rest} | sed "s/${vendor}-//"`
  368.         fi
  369.     fi
  370.     ;;
  371. esac
  372.  
  373. # At this point we should have three parts of a canonical name in cpu,
  374. # vendor, and os.
  375.  
  376. # verify that the cpu is known.
  377.  
  378. case "${cpu}" in
  379. none | vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc \
  380.     | ns32k | alliant | arm | c1 | c2 | mips | pyramid | tron \
  381.     | a29k | romp | rs6000 | i960 | xmp | ymp | cray2 | 580 | h8300)
  382.     ;;
  383.  
  384.  
  385. *)
  386.     echo '***' Invalid cpu \`${cpu}\': configuration \`$1\' not recognized 1>&2
  387.     exit 1
  388.     ;;
  389. esac
  390.  
  391. # verify that the vendor is known.
  392.  
  393. case "${vendor}" in
  394.     altos | amd | amdahl | aout | apollo | att | bcs | bout |\
  395.     cbm | convergent | convex | coff | cray | dec | encore |\
  396.     gould | hitachi | intel | isi | hp | ibm | little | mips | motorola |\
  397.     ncr | next | none | nyu | sco | sequent | sgi | sony | sun |\
  398.     unicom | utek | wrs | bull ) ;; 
  399.  
  400.  
  401. *)
  402.     echo '***' Invalid vendor \`${vendor}\': configuration \`$1\' not recognized 1>&2
  403.     exit 1
  404.     ;;
  405. esac
  406.  
  407. # verify that the os is known, if it exists.
  408.  
  409. case "${os}" in
  410. aix* | aout | bout | bsd* | coff | ctix* | dgux* | dynix* | esix* \
  411.     | ebmon | hpux* \
  412.     | hds | irix* | isc* | kern | mach* | msdos* | newsos* | nindy* | none \
  413.     | osf* | sco* | sunos* | sysv* | ultrix* | unos* | v88r* \
  414.     | vms* | vxworks* | sym[1-9]* | unicos* | uts | svr4 \
  415.     | amigados) 
  416.     ;;
  417.  
  418.  
  419. *)
  420.     echo '***' Invalid os \`${os}\': configuration \`$1\' not recognized 1>&2
  421.     exit 1
  422.     ;;
  423. esac
  424.  
  425. echo ${cpu}-${vendor}-${os}
  426.